<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="GENERATOR" content="IBM Software Development Platform">
<TITLE>index.htm</TITLE>
<SCRIPT>

function sortSelect(obj){
	var mtx = SELECT2Matix(obj);
 
	sortMatrix(mtx);
	clearSELECT(obj);
	matrix2SELECT(mtx, obj);
 
}
function SELECT2Matix(obj){
	var rowsCount = obj.options.length;
	var mtx = new Array();
	var opt = null;

	for(var i = 0 ; i < rowsCount ; i++) {
		opt = obj.options(i);

		mtx[i] = new Array();
		mtx[i][0] = opt.value;
		mtx[i][1] = opt.text;

	}
	return mtx;
}

function sortMatrix(mtx){
	var rowsCount = mtx.length;
	var i = 0;
	var j = 0;
	var k = 0;

	for(i = 0 ; i < rowsCount-1 ; i++) {
		j=i;
		k=i+1;
		while(mtx[j][1] > mtx[k][1]) {
			aux = mtx[j];
			mtx[j] = mtx[k];
			mtx[k] = aux;
			j--;
			k--;
				
			if(j<0) {
				j=0;
				k=1;
			}
		}
	}
}

function clearSELECT(obj){
	var rowsCount = obj.options.length;
	for(var i = rowsCount ; i >= 0 ; i--) {
		obj.remove(i);
	}
}

function matrix2SELECT(mtx, obj){
	var rowsCount = mtx.length;
	var opt = null;

	for(i = 0 ; i <rowsCount ; i++) {	
		opt = document.createElement("OPTION");
		opt.value = mtx[i][0];
		opt.text = mtx[i][1];

		obj.add(opt);
//		objTabla.rows[i+1].className = mtx[i][j];
	}

}
</SCRIPT>
</HEAD>
<BODY>
<SELECT id="emp" size="7">
<option value='20'>Cable Express</option>
<option value='30'>Claro</option>
<option value='40'>Direct TV</option>
<option value='50'>Edelnor</option>
<option value='60'>Alectro Oriente</option>
<option value='70'>Electronoroeste</option>
  
<option value='8'>Electronorte</option>
<option value='9'>EMSA PUNO</option>
<option value='10'>Hidrandina</option>
<option value='11'>Luz del Sur</option>
<option value='12'>Megacable</option>
<option value='13'>Metrópolis</option>
<option value='14'>Millicom Perú</option>
<option value='15'>Nextel</option>
<option value='16'>Red Privada Virtual</option>
<option value='17'>Sedaloreto</option>
<option value='18'>Sedapal</option>
<option value='19'>TDP ABONOS</option>
<option value='20'>Telecable</option>
<option value='21'>Telefónica</option>
<option value='22'>Telmex</option>
<option value='23'>Terra</option>
<option value='24'>C.C. El Bosque</option>
<option value='25'>Club de Regatas Lima</option>
<option value='26'>Club Kapala</option>
<option value='27'>Club Playa Sarapampa</option>
<option value='28'>Country Club de Villa</option>
<option value='29'>Parque Venecia Pradera</option>
<option value='30'>Playa Punta Corrientes</option>
<option value='31'>Sol y Mar Playa Club</option>
<option value='32'>Touring Club</option>
<option value='33'>200 Millas Peruanas</option>
<option value='34'>Abraham Lincoln (La Molina)</option>
<option value='35'>Agustiniano San Martín</option>
<option value='36'>Alpamayo</option>
<option value='37'>Ann Sullivan</option>
<option value='38'>Asoc. Educ. Cruz Saco</option>
<option value='39'>Asoc. Educ. Jesualdo</option>
<option value='40'>Asoc. Educ. Kallpa</option>
<option value='41'>Asoc. Educ. Mi Jardín</option>
<option value='42'>Beata Imelda</option>
<option value='43'>Berkeley High School</option>
<option value='44'>Cambridge College Lima</option>
<option value='45'>CE Bartolomé Herrera</option>
<option value='46'>CEGNE Pedro Nolasco</option>
<option value='47'>CEGNE San Pablo</option>
<option value='48'>CEIP Feeling Good</option>
<option value='49'>CENE De la Cruz</option>
<option value='50'>Centro de Educación Alternativa - EDUCALTER</option>
<option value='51'>CEP CPV College E.I.R.L.</option>
<option value='52'>CEP Niño Jesús de Praga</option>
<option value='53'>CEP Reino de los Cielos</option>
<option value='54'>CEP Santísima Cruz</option>
<option value='55'>CEPEA S.A</option>
<option value='56'>Clinton Rodham</option>
<option value='57'>Colegio Casuarinas</option>
<option value='58'>Colegio Militar Elías Aguirre</option>
<option value='59'>Colegio Roosevelt</option>
<option value='60'>Concordia Universal</option>
<option value='61'>Corazón de Jesús</option>
<option value='62'>Cristo Redentor</option>
<option value='63'>Cristo Rey</option>
<option value='64'>Esclavas del Sagrado Corazón</option>
<option value='65'>Hogar y Escuela</option>
<option value='66'>Hosanna</option>
<option value='67'>Inmaculada Concepción</option>
<option value='68'>Inmaculada Concepción</option>
<option value='69'>Isaac Newton</option>
<option value='70'>Jean Piaget</option>
<option value='71'>Jesús El Nazareno</option>
<option value='72'>Jorge Polar</option>
<option value='73'>Juan Jacobo Rousseau</option>
<option value='74'>La Encantada</option>
<option value='75'>Los Rosales de Santa Rosa</option>
<option value='76'>Magister</option>
<option value='77'>Manuel Ramírez</option>
<option value='78'>María Auxiliadora</option>
<option value='79'>María Reina de los Apóstoles</option>
<option value='80'>María Reina Marianista - APAFA</option>
<option value='81'>Mariano Melgar</option>
<option value='82'>Markham College</option>
<option value='83'>Mary's Children School</option>
<option value='84'>Newton</option>
<option value='85'>Nuestra Señora de la Merced</option>
<option value='86'>Nuestra Señora del Carmen (Barranca)</option>
<option value='87'>Nuestra Señora del Carmen (Carmelitas)</option>
<option value='88'>Nuestra Señora del Patrocinio</option>
<option value='89'>Pablo Picasso</option>
<option value='90'>Patrocinio San José</option>
<option value='91'>Patronato Escolar Peruano Aleman Max Uhle</option>
<option value='92'>Paul Rivet</option>
<option value='93'>Rayito de Luz</option>
<option value='94'>Reyna de la Paz</option>
<option value='95'>Rosa de los Angeles</option>
<option value='96'>Sagrados Corazones</option>
<option value='97'>Salesiano Don Bosco (Piura)</option>
<option value='98'>San Francisco de Borja</option>
<option value='99'>San Francisco Javier</option>
<option value='100'>San Jorge de Miraflores</option>
<option value='101'>San José del Callao</option>
<option value='102'>San José Hermanos Maristas</option>
<option value='103'>San José Obrero</option>
<option value='104'>San Juan María Vianey</option>
<option value='105'>San Julián</option>
<option value='106'>San Luis</option>
<option value='107'>San Silvestre</option>
<option value='108'>Santa Ana (Cusco)</option>
<option value='109'>Santa Ana (Tacna)</option>
<option value='110'>Santa Ana (Tacna)</option>
<option value='111'>Santa Margarita</option>
<option value='112'>Santa María de la Gracia</option>
<option value='113'>Santa Martha del Callao</option>
<option value='114'>Santa Rosa de Lima</option>
<option value='115'>Santo Tomás de Aquino</option>
<option value='116'>Santo Toribio de Mogrovejo</option>
<option value='117'>Sor Ana de los Angeles (Jesús María)</option>
<option value='118'>Sor Ana de los Angeles (Miraflores)</option>
<option value='119'>Valle Sol</option>
<option value='120'>Villa Fátima</option>
<option value='121'>Altas Cumbres</option>
<option value='122'>Interseguro</option>
<option value='123'>Invita</option>
<option value='124'>La Positiva</option>
<option value='125'>La Positiva Vida</option>
<option value='126'>Mapfre Perú</option>
<option value='127'>Novasalud</option>
<option value='128'>Pacífico Peruano Suiza</option>
<option value='129'>Pacífico Salud</option>
<option value='130'>Pacífico Vida</option>
<option value='131'>Royal Sunalliance Seguros Fénix</option>
<option value='132'>Banco de Materiales</option>
<option value='133'>ENAPU</option>
<option value='134'>FOVIPOL - Aportaciones</option>
<option value='135'>Municipalidad de Ancón</option>
<option value='136'>Municipalidad de Ate - Papeletas</option>
<option value='137'>Municipalidad de Ate - Tributos</option>
<option value='138'>Municipalidad de Breña - Papeletas</option>
<option value='139'>Municipalidad de Carabayllo</option>
<option value='140'>Municipalidad de Huaral</option>
<option value='141'>Municipalidad de Huarochirí - Matucana</option>
<option value='142'>Municipalidad de La Molina - Imp. Predial y Arbitrios</option>
<option value='143'>Municipalidad de Magdalena del Mar</option>
<option value='144'>Municipalidad de Miraflores</option>
<option value='145'>Municipalidad de San Antonio</option>
<option value='146'>Municipalidad de San Isidro</option>
<option value='147'>Municipalidad de San Luis - Papeletas</option>
<option value='148'>Municipalidad de San Martín de Porres</option>
<option value='149'>Municipalidad de Yauli</option>
<option value='150'>Municipalidad del Rímac</option>
<option value='151'>ONP</option>
<option value='152'>SAT</option>
<option value='153'>SUNAD</option>
<option value='154'>APC Corporación</option>
<option value='155'>Asociación Santo Tomás de Aquino</option>
<option value='156'>Avinka - Aves Vivas</option>
<option value='157'>Avon</option>
<option value='158'>Cálidda - Gas Natural</option>
<option value='159'>Campo Fé</option>
<option value='160'>Clínica Anglo Americana - ANGLOSALUD</option>
<option value='161'>Clínica Ricardo Palma</option>
<option value='162'>Clínica San Borja - Cuota PSF</option>
<option value='163'>Clínica Santa Teresa - Medisistem</option>
<option value='164'>Colegio de Ingenieros del Perú - Sede Lima</option>
<option value='165'>Comisión Fulbright</option>
<option value='166'>Corporación Meier - Cobranza de recibos</option>
<option value='167'>Diners Club</option>
<option value='168'>DYCLASS PERU</option>
<option value='169'>Ebel</option>
<option value='170'>FINANCOR - Ripley</option>
<option value='171'>Jardín del Buen Retiro</option>
<option value='172'>La Grande</option>
<option value='173'>Maison de Santé</option>
<option value='174'>Natura Cosméticos</option>
<option value='175'>ONCOSALUD S.A.C.</option>
<option value='176'>PERSOLAC - Cobranza de recibos</option>
<option value='177'>Perufarma</option>
<option value='178'>Sembrando</option>
<option value='179'>Unique</option>
<option value='180'>AMS Campus</option>
<option value='181'>Arzobispo Loayza</option>
<option value='182'>Asociación ADUNI - César Vallejo</option>
<option value='183'>Daniel A. Carrión</option>
<option value='184'>Fundación Universitaria Iberoamericana</option>
<option value='185'>IDAT</option>
<option value='186'>Instituto Tecnológico de Lima</option>
<option value='187'>IPAE</option>
<option value='188'>Peruano Alemán</option>
<option value='189'>Proforhum</option>
<option value='190'>SENATI - Pasco</option>
<option value='191'>Universidad Católica del Perú</option>
<option value='192'>Universidad Cayetano Heredia</option>
<option value='193'>Universidad Científica del Sur</option>
<option value='194'>Universidad de Lima</option>
<option value='195'>Universidad de San Martín de Porres</option>
<option value='196'>Universidad Los Andes</option>
<option value='197'>Universidad Nacional del Centro</option>
<option value='198'>Universidad Nacional del Santa</option>
<option value='199'>Universidad Santo Toribio de Mogrovejo</option>
<option value='200'>Universidad Tecnológica del Perú</option>
<option value='201'>UPC</option>
 
</SELECT>

<input type="button" onclick="javaScript:sortSelect(document.getElementById('emp'));" value="Ordena Lista">

</BODY>

</HTML>
